﻿using Admin.Core.Model.Quality;
using Admin.Core.Service.Quality.CheckReport.Input;
using Admin.Core.Service.Quality.CheckReport.Output;
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Text;

namespace Admin.Core.Service.Quality.CheckReport
{
    /// <summary>
    /// 映射配置
    /// 双向映射 .ReverseMap()
    /// </summary>
    public class MapConfig : Profile
    {
        public MapConfig()
        {
            //新增
            CreateMap<CheckReportAddInput, CheckReportEntity>();
            CreateMap<CheckReportUpdateInput, CheckReportEntity>();
            //修改
            //查询
            CreateMap<CheckReportEntity, CheckReportGetOutput>();
            CreateMap<CheckReportEntity, CheckReportListOutput>();
            //    .ForMember(
            //  d => d.Status,
            //  m => m.MapFrom(s => s.Status == 0 ? "新建" : s.Status == 1 ? "执行中" : s.Status == 2 ? "已完成" : "")
            //);
            //CreateMap<XbcType, XbcTypeConfOutput>();  0 新建  1 执行中  2 已完成
        }
    }
}
